<?xml version="1.0" encoding="UTF-8" ?>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core"%>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>寝室列表</title>
</head>
<body>
	<h1>${building.name }所有寝室列表</h1>
	<ul>
		<c:forEach items="${dormitories.list}" var="dormitory">
			<li>
				寝室ID：${dormitory.id }
				寝室名称：${dormitory.name }
				寝室电话：${dormitory.telephone }
				寝室介绍：${dormitory.description }
				寝室可住人数：${dormitory.capacity }
				<a href="dormitory.do?method=updateForm&id=${dormitory.id }">修改信息</a>
				<a href="dormitory.do?method=delete&id=${dormitory.id }">删除</a>
			</li>
		</c:forEach>
	</ul>
	<a href="dormitory.do?method=addForm&buildingId=${building.id }">为该楼栋增加寝室</a>
	<a href="building.do?method=list">返回楼栋列表</a>
</body>
</html>